package com.whenjun.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ifootbook.util.common.BackJson;
import com.ifootbook.util.common.CallResult;
import com.whenjun.common.LoggerParent;
import com.whenjun.dto.isc.person.IscPersonReq;
import com.whenjun.dto.person.IscPersonDTO;
import com.whenjun.service.impl.IscPersonServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("iscPerson")
@RestController
@Api(tags = "isc人员")
@SaCheckLogin
public class IscPersonController extends LoggerParent {

    @Autowired
    private IscPersonServiceImpl iscPersonService;

    @ApiOperation("人员列表")
    @PostMapping("list")
    public CallResult<IPage<IscPersonDTO>> persons(@RequestBody(required = false)IscPersonReq iscPersonReq) {
        return BackJson.success(iscPersonService.persons(iscPersonReq));
    }

}
